<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/11/25
  Time: 10:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改页面</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/book.css">
    <style>
        div {
            width: 600px;
            margin: 1em auto;
            padding: 1em;
            background: #eee;
            text-align: center;
        }
        form {
            width: 300px;
            display: grid;
            grid-template-columns: 1fr;
            grid-gap: 2px;
            margin-left: 150px;
        }
    </style>
</head>
<body>
<%-- ${pageContext.request.contextPath} 这里的路径是绝对路径 --%>
    <div>
        <h3>修改页面</h3>
        <form action="${pageContext.request.contextPath}/book/update" method="post" class="edit">
            <input type="text" name="id" placeholder="请输入要修改的编号" value="${book.id}" readonly>
            <input type="text" name="name" placeholder="请输入要修改的图书名称" value="${book.name}">
            <input type="text" name="author" placeholder="请输入要修改的图书作者" value="${book.author}">
            <input type="number" name="price" placeholder="请输入要修改的图书价格" value="${book.price}">
            <input type="text" name="press" placeholder="请输入要修改的图书出版社" value="${book.press}">
            <input type="text" name="sales" placeholder="请输入要修改的图书销量" value="${book.sales}">
            <button>更新按钮</button>
        </form>
        <a href="${pageContext.request.contextPath}/book/list">返回首页</a>
    </div>

<%-- 页脚 --%>
<%@include file="/footer.jsp"%>
</body>
</html>
